package net.fuzui.StudentInfo.service;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import net.fuzui.StudentInfo.mapper.CoursecommentMapper;
import net.fuzui.StudentInfo.pojo.Coursecomment;
import net.fuzui.StudentInfo.service.CoursecommentService;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * @description: description
 * @author: tangxiaocheng
 * @create: 2021-02-13 10:05
 */


@Service
public class CourseCommentServiceImpl implements CoursecommentService {

    @Autowired
    private CoursecommentMapper courseCommentMapper;

    @Override
    public int addAnonymousComment(Coursecomment courseComment) {
        return courseCommentMapper.insertComment(courseComment);
    }

    @Override
    public List<Coursecomment> getCommentsByCourseId(String courseId) {
        return courseCommentMapper.getCommentsByCourseId(courseId);
    }
}

